package com.wzd.imservice.entity.vo;

import com.wzd.imservice.entity.Mine;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Objects;

/**
 * @ProjectName: e_learning
 * @Package: com.wzd.imservice.entity
 * @ClassName: Chat
 * @Author: lofxve
 * @Description:
 * @Date: 2021/4/19 17:46
 * @Version: 1.0
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "chatVo", description = "会话列表")
public class ChatVo {
    private String id;
    private String name;
    private String type;
    private String avatar;
    private String online;
    private String role;
    private List<Mine> userList;
    private String master;
    private Integer messageSize;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ChatVo chatVo = (ChatVo) o;
        return Objects.equals(id, chatVo.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
